﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XuZhou.SmartWaterConservancy.HeHu.Waters
{
    public class WaterLevelStation:WaterStationBase
    {
        /// <summary>
        /// 水流量(m³/s)
        /// </summary>
        public double? Flow { get; private set; }

        /// <summary>
        /// 水位(m)
        /// </summary>
        public double? WaterLevel { get; private set; }

        /// <summary>
        /// 最后监测时间
        /// </summary>
        public DateTime? LastMonitoringTime { get; private set; }

        protected WaterLevelStation() : base() { }

        public WaterLevelStation(
            Guid id,
            string code,
            string name,
            string administrativeDivisionCode,
            double longitude,
            double latitude,
            string remark = null)
            : base(id, code, name, WaterStationType.WaterLevel, administrativeDivisionCode, longitude, latitude, remark)
        {
        }

        /// <summary>
        /// 更新水位监测数据
        /// </summary>
        public void UpdateMonitoringData(double? flow, double? waterLevel)
        {
            Flow = flow;
            WaterLevel = waterLevel;
            LastMonitoringTime = DateTime.Now;
        }
    }
}
